Representing Nested Inductive Types Using W-Types
نویسندگان
چکیده
We show that strictly positive inductive types, constructed from polynomial functors, constant exponentiation and arbitrarily nested inductive types exist in any Martin-Löf category (extensive locally cartesian closed category with W-types) by exploiting our work on container types. This generalises a result by Dybjer (1997) who showed that non-nested strictly positive inductive types can be represented using W-types. We also provide a detailed analysis of the categorical infrastructure needed to establish the result.
منابع مشابه
Monotone ( Co ) Inductive Types and Fixed - Point Types
We study ve extensions of the polymorphically typed lambda-calculus (system F) by type constructs intended to model xed-points of monotone operators. Building on work by H. Geuvers concerning the relation between term rewrite systems for least pre-xed-points and greatest post-xed-points of positive type schemes (i. e., non-nested positive inductive and coinductive types) and so-called retract t...
متن کاملConstructing Strictly Positive Types
We introduce container functors as a representation of data types providing a new conceptual analysis of data structures and polymorphic functions. Our development exploits Type Theory as a convenient way to define constructions within locally cartesian closed categories. We show that container morphisms can be full and faithfully interpreted as polymorphic functions (i.e. natural transformatio...
متن کاملHaskell Programming with Nested Types: A Principled Approach
Initial algebra semantics is one of the cornerstones of the theory of modern functional programming languages. For each inductive data type, it provides a Church encoding for that type, a build combinator which constructs data of that type, a fold combinator which encapsulates structured recursion over data of that type, and a fold/build rule which optimises modular programs by eliminating from...
متن کاملHaskell Programming with Nested Types : A Principled
Initial algebra semantics is one of the cornerstones of the theory of modern functional programming languages. For each inductive data type, it provides a Church encoding for that type, a build combinator which constructs data of that type, a fold combinator which encapsulates structured recursion over data of that type, and a fold/build rule which optimises modular programs by eliminating from...
متن کاملCoinitial semantics for redecoration of triangular matrices
In Martin-Löf type theory, simple inductive types—W-types—are characterized categorically as initial algebras of a polynomial functor. Dually, coinductive types are characterized as terminal coalgebras of polynomial functors. In the case of coinductive types, the meta-theoretic notion of equality given by Martin-Löf’s identity type is too weak: instead, the idea of bisimilarity as equality for ...
متن کامل